package com.zhangc.blog.base.batchtask;

import java.util.Objects;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Tuple2<F1, F2> {

    private F1 f1;

    private F2 f2;

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        Tuple2<?, ?> tuple2 = (Tuple2<?, ?>) o;
        return Objects.equals(f1, tuple2.f1) &&
                Objects.equals(f2, tuple2.f2);
    }

    @Override
    public int hashCode() {
        return Objects.hash(f1, f2);
    }
}
